package abstractclass;

public class Demo01 {
    public static void main(String[] args) {
        Forg f = new Forg();
        method01(f);

        Animal a = method02();
        a.eat();
    }
    public static void method01(Animal a){
        a.eat();
    }

    public static Animal method02(){

        return new Forg();  // 直接new Forg() 返回给 a
    }
}


